In recent years, with the popularity of electronic devices, people have used electronic devices for listening to music, watching video programs, playing video games and communicating with friends. When using the electronic device, a user may carelessly spill water or other liquid on the electronic device, which causes a short circuit event of an electronic component located in the electronic device. Therefore, a waterproof electronic device is needed.